<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        window.onload=function fx(){
            var a,b,c,d;
            
              for(var i=1000;i<=9999;i++)
            { 
                a=parseInt(i/1000);
               a=a%10;
               b=parseInt(i/100);
               b=b%10;
               c=parseInt(i/10);
               c=c%10;
               d=i%10;
            
                
                document.write(a+"*"+a+"*"+a+"*"+a+"+"+b+"*"+b+"*"+b+"*"+b+"+"+c+"*"+c+"*"+c+"*"+c+"+"+d+"*"+d+"*"+d+"*"+d+"<br>");
            }
        }
    </script>
</body>
</html>